import logging
import yagmail
def test_loc():
    logging.basicConfig(level=logging.DEBUG,format='%(name)s_%(levelno)s_%(message)s',handlers=[
        logging.StreamHandler(),
        logging.FileHandler('log.txt')
    ])

def sent_mail(a):
    mail=yagmail.SMTP(user='3192933068@qq.com',password='sxajwqyvomtpdfch',host='smtp.qq.com')
    mail.send(to='3192933068@qq.com',subject='报告标题',contents='报告内容',attachments=a)
